<div id="libraryFileOrganizerPage" data-role="page" class="page type-interior pluginConfigurationPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Auto-Organize" data-controller="__plugin/AutoOrganizeMovieJs">
    <div>
        <div class="content-primary">

            <form class="libraryFileOrganizerForm">

                <div>
                    <label class="checkboxContainer">
                        <input type="checkbox" is="emby-checkbox" id="chkEnableMovieSorting" />
                        <span>启用电影自动整理</span>
                    </label>
                </div>
                <div class="inputContainer">
                    <div style="display:flex; align-items:center;">
                        <div style="flex-grow:1;">
                            <input is="emby-input" id="txtWatchMovieFolder" type="text" label="监控文件夹:" />
                            <div class="fieldDescription">将监控此文件夹下的新电影</div>
                        </div>
                        <button type="button" is="paper-icon-button-light" id="btnSelectWatchMovieFolder" title="选择目录" class="autoSize"><i class="material-icons search"></i></button>
                    </div>
                </div>
                <div class="inputContainer">
                    <input is="emby-input" id="txtMovieMinFileSize" type="number" label="最小文件大小：" pattern="[0-9]*" min="0" required />
                    <div class="fieldDescription">小于此值的文件将被忽略。</div>
                </div>

                <div class="checkboxContainer">
                    <label>
                        <input type="checkbox" is="emby-checkbox" id="chkSubMovieFolders" />
                        <span>为每部电影创建子目录</span>
                    </label>
                </div>

                <div is="emby-collapse" class="hide fldSelectMovieFolderPattern" title="电影文件夹命名格式">
                    <div class="collapseContent">
                        <br />
                        <div class="inputContainer">
                            <input is="emby-input" id="txtMovieFolderPattern" type="text" label="电影文件夹命名格式" required />
                            <div class="fieldDescription movieFolderPatternDescription"></div>
                        </div>

                        <br />
                        <p>支持的格式</p>

                        <table id="movie-table" class="ui-responsive">
                            <thead>
                                <tr>
                                    <th>术语</th>
                                    <th>格式</th>
                                    <th>结果</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>电影名</td>
                                    <td>%mn</td>
                                    <td>电影名</td>
                                </tr>
                                <tr>
                                    <td>电影名</td>
                                    <td>%m.n</td>
                                    <td>Movie.电影名</td>
                                </tr>
                                <tr>
                                    <td>电影名</td>
                                    <td>%m_n</td>
                                    <td>Movie_电影名</td>
                                </tr>
                                <tr>
                                    <td>发行年份</td>
                                    <td>%my</td>
                                    <td>2017</td>
                                </tr>
                                <tr>
                                    <td>文件扩展名</td>
                                    <td>%ext</td>
                                    <td>mkv</td>
                                </tr>
                                <tr>
                                    <td>原始文件名</td>
                                    <td>%fn</td>
                                    <td>文件名</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div is="emby-collapse" title="电影文件格式">
                    <div class="collapseContent">
                        <br />
                        <div class="inputContainer">
                            <input is="emby-input" id="txtMoviePattern" type="text" label="电影格式:" required />
                            <div class="fieldDescription moviePatternDescription"></div>
                        </div>

                        <br />
                        <p>支持的格式</p>

                        <table id="movie-table" class="ui-responsive">
                            <thead>
                                <tr>
                                    <th>术语</th>
                                    <th>格式</th>
                                    <th>结果</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>电影名</td>
                                    <td>%mn</td>
                                    <td>电影名</td>
                                </tr>
                                <tr>
                                    <td>Movie name</td>
                                    <td>%m.n</td>
                                    <td>Movie.电影名</td>
                                </tr>
                                <tr>
                                    <td>Movie name</td>
                                    <td>%m_n</td>
                                    <td>Movie_电影名</td>
                                </tr>
                                <tr>
                                    <td>发行年份</td>
                                    <td>%my</td>
                                    <td>2017</td>
                                </tr>
                                <tr>
                                    <td>文件扩展名</td>
                                    <td>%ext</td>
                                    <td>mkv</td>
                                </tr>
                                <tr>
                                    <td>原始文件名</td>
                                    <td>%fn</td>
                                    <td>文件名</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <br /><br />
                <div class="selectContainer">
                    <select is="emby-select" id="copyOrMoveMovieFile" label="转移方法:">
                        <option value="true">复制</option>
                        <option value="false">移动</option>
                    </select>
                    <div class="fieldDescription editorfieldDescription">从监控文件夹复制或移动文件</div>
                </div>
                <div>
                    <label class="checkboxContainer">
                        <input type="checkbox" is="emby-checkbox" id="chkOverwriteExistingMovies" />
                        <span>覆盖现有电影</span>
                    </label>
                </div>
                <div class="inputContainer">
                    <input is="emby-input" id="txtDeleteLeftOverMovieFiles" type="text" label="删除剩余文件" />
                    <div class="fieldDescription">提供要删除的文件扩展名列表，用分号分隔 (;)</div>
                </div>
                <div class="checkboxContainer checkboxContainer-withDescription">
                    <label>
                        <input type="checkbox" is="emby-checkbox" id="chkDeleteEmptyMovieFolders" />
                        <span>删除空文件夹</span>
                    </label>
                    <div class="fieldDescription checkboxFieldDescription">空文件夹将被删除</div>
                </div>
                <div class="checkboxContainer checkboxContainer-withDescription">
                    <label>
                        <input type="checkbox" is="emby-checkbox" id="chkExtendedClean" />
                        <span>拓展清理</span>
                    </label>
                    <div class="fieldDescription checkboxFieldDescription">扩展清理遗留文件和空文件夹</div>
                </div>
                <div class="checkboxContainer checkboxContainer-withDescription">
                    <label>
                        <input type="checkbox" is="emby-checkbox" id="chkQueueLibScan" />
                        <span>完成队列库扫描</span>
                    </label>
                    <div class="fieldDescription checkboxFieldDescription">库扫描完成后排队，如果设置在电影和电视节目中，库扫描将触发一次</div>
                </div>
                <div class="checkboxContainer checkboxContainer-withDescription">
                    <label>
                        <input type="checkbox" is="emby-checkbox" id="chkEnableMovieAutoDetect" />
                        <span>启用电影自动检测</span>
                    </label>
                    <div class="fieldDescription checkboxFieldDescription">警告！Beta功能，小心使用，这可能会导致扫描时间过长和错误识别</div>
                </div>
                <div class="fldSelectMovieFolder hide selectContainer">
                    <select id="selectMovieFolder" is="emby-select" label="默认电影库:"></select>
                </div>
                <div>
                    <button is="emby-button" type="submit" class="raised button-submit block"><span>保存</span></button>
                </div>
            </form>

        </div>
    </div>
</div>
